﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Baosight.ZNH.ZMCA.UI.Utils;

namespace Baosight.ZNH.ZMCA.UI.Controls
{
    /// <summary>
    /// 三联仪表盘控件
    /// 使用该控件时可以设置leftNeedle.Value，centerNeedle.Value和rightNeedle.Value来设置指标值
    /// 可以设置leftDesc.Text, centerDesc.Text和rightDesc.Text来显示补充信息，如单位信息
    /// 可以通过调用leftControler, centerControler和rightControler的SetMarkerValer方法设置警告值和安全值
    /// 
    /// 三联仪表盘多了leftAdditionalInfo，centerAdditionalInfo和rightAdditionalInfo用于显示完成率信息，单联和双联因为没有用到，所以暂时没有加
    /// </summary>
    public partial class TriCircleGauge : UserControl
    {
        public RadialGaugeControler centerControler;
        public RadialGaugeControler leftControler;
        public RadialGaugeControler rightControler;
        public TriCircleGauge()
        {
            InitializeComponent();
            RadialGaugeControler.InitRadialScale(centerGauge, centerRadialScale, new TextBlock[]{centerGaugeDescription, centerAdditionalInfo});
            RadialGaugeControler.InitRadialScale(leftGauge, leftRadialScale, new TextBlock[] { leftGaugeDescription, leftAdditionalInfo});
            RadialGaugeControler.InitRadialScale(rightGauge, rightRadialScale, new TextBlock[]{rightGaugeDescription, rightAdditionalInfo});
            centerControler = new RadialGaugeControler(centerRadialScale, centerRadialBar, centerNeedle, centerMarkerWarning, centerMarkerPass, numericIndicator);
            leftControler = new RadialGaugeControler(leftRadialScale, leftRadialBar, leftNeedle, leftMarkerWarning, leftMarkerPass, leftNumericIndicator);
            rightControler = new RadialGaugeControler(rightRadialScale, rightRadialBar, rightNeedle, rightMarkerWarning, rightMarkerPass, rightNumericIndicator);
        }

        
    }
}
